﻿namespace Nop.Plugin.Payments.UsaEpay.Models
{
    #region

    using Nop.Web.Framework.Mvc;

    #endregion

    /// <summary>
    ///     The configure model.
    /// </summary>
    public class ConfigureModel : BaseNopModel
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigureModel"/> class.
        /// </summary>
        public ConfigureModel()
        {
            // Needed for defaul model binding.
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="ConfigureModel"/> class.
        /// </summary>
        /// <param name="paymentMethodSettings">
        /// The payment method settings.
        /// </param>
        /// <param name="activeStoreScopeConfiguration">
        /// The active Store Scope Configuration.
        /// </param>
        public ConfigureModel(UsaEpayPaymentSettings paymentMethodSettings, int activeStoreScopeConfiguration)
        {
            this.AdditionalFee = paymentMethodSettings.AdditionalFee;
            this.AdditionalFeePercentage = paymentMethodSettings.AdditionalFeePercentage;
            this.Pin = paymentMethodSettings.Pin;
            this.SourceKey = paymentMethodSettings.SourceKey;
            this.ActiveStoreScopeConfiguration = activeStoreScopeConfiguration;
            this.Url = paymentMethodSettings.Url;
        }

        /// <summary>
        /// Gets or sets the url.
        /// </summary>
        public string Url { get; set; }

        /// <summary>
        ///     Gets or sets the additional fee.
        /// </summary>
        public decimal AdditionalFee { get; set; }

        /// <summary>
        ///     Gets or sets a value indicating whether additional fee percentage.
        /// </summary>
        public bool AdditionalFeePercentage { get; set; }

        /// <summary>
        ///     Gets or sets the pin.
        /// </summary>
        public string Pin { get; set; }

        /// <summary>
        ///     Gets or sets the source key.
        /// </summary>
        public string SourceKey { get; set; }

        /// <summary>
        ///     Gets or sets active store scope configuration.
        /// </summary>
        public int ActiveStoreScopeConfiguration { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether override store source key.
        /// </summary>
        public bool OverrideStoreSourceKey { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether override store pin.
        /// </summary>
        public bool OverrideStorePin { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether override store IP address.
        /// </summary>
        public bool OverrideStoreIpAddress { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether override store additional fee percentage.
        /// </summary>
        public bool OverrideStoreAdditionalFeePercentage { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether override store additional fee.
        /// </summary>
        public bool OverrideStoreAdditionalFee { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether override store url.
        /// </summary>
        public bool OverrideStoreUrl { get; set; }
    }
}